package com.grape.annotation;


import com.grape.validator.DeviceTypeValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * 验证设备类型注解
 *
 * @author  putao
 * @email   2628279194@qq.com
 */
@Documented
@Constraint(validatedBy = DeviceTypeValidator.class)
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface ValidDeviceType {

    String message() default "字段必须为PHONE或者PC";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
